import {createApp} from 'vue'
import ElementPlus from 'element-plus' // 引入 Element Plus 核心
import 'element-plus/dist/index.css' // 引入 Element Plus 样式
import * as ElementPlusIconsVue from '@element-plus/icons-vue' // 图标
import App from './App.vue'
import router from "@/router/index.js";
import {zhCn} from "element-plus/es/locale/index";

const app = createApp(App)

// 注册 Element Plus 核心组件,并设置语言为中文
app.use(ElementPlus, {
    locale: zhCn,
})

// 注册 Element Plus 图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

app.use(router).mount('#app')
